package com.hxzy.common.annon;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hxzy.common.aspect.SensitiveSerialize;
import com.hxzy.common.enums.SensitiveEnum;

import java.lang.annotation.*;

/**
 * 数据脱敏注解
 * @author 11452
 */
@Target(value = {ElementType.FIELD,ElementType.TYPE})
@Retention(value = RetentionPolicy.RUNTIME)
@Documented
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveSerialize.class)
public @interface Sensitive {

    /**
     * 数据脱敏的类型
     * @return
     */
    SensitiveEnum  type() ;
}
